package test.com.geeksaga.helper;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;


import org.junit.Test;
import org.springframework.core.SpringVersion;

import com.geeksaga.annotation.ClassPreamble;
import com.geeksaga.annotation.PrintToString;

/**
 * @author newbie
 * @since 0.1
 */
@ClassPreamble (
		   author = "newbie",
		   date = "13/11/2008",
		   currentRevision = 1,
		   lastModified = "13/11/2008",
		   lastModifiedBy = "newbie",
		   reviewers = {""}
		)		
public class ToStringHelper {
	
	@PrintToString
	private String field1;
	
	@PrintToString
	private String field2;
	
	public String getField1() {
		return field1;
	}

	public void setField1(String field1) {
		this.field1 = field1;
	}

	public String getField2() {
		return field2;
	}

	public void setField2(String field2) {
		this.field2 = field2;
	}

	@Override
	public String toString() {
		return com.geeksaga.helper.ToStringHelper.toString(this);
	}

	@Test
	public void verifyArrayContents() throws Exception {
		String[] actual = new String[] { "JUnit 3.8.x", "JUnit 4.3" };
		String[] var = new String[] { "JUnit 3.8.x", "JUnit 4.3" };
		assertArrayEquals("the two arrays should not be equal", actual, var);
	}
	
	@Test
	public void version() throws Exception {
		assertEquals("2.5.6", SpringVersion.getVersion());
	}
}
